package com.itheima.mapper;

import com.itheima.pojo.Brand;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface BrandMapper {
    @Select("select * from tb_brand where id=#{id}")
    public Brand SelectByID(int id);

    @Select("select * from tb_brand")
    public List<Brand> SelectAll();

    @Delete("delete from tb_brand where id=#{id}")
    public void DeleteByID(int id);

    @Update("update tb_brand set brand_name=#{brandName},company_name=#{companyName},ordered=#{ordered},description=#{description},status=#{status}  where id=#{id}")
    public void Update(Brand brand);

    @Insert("Insert into tb_brand(ID, BRAND_NAME, COMPANY_NAME, ORDERED, DESCRIPTION, STATUS) values(#{id},#{brandName},#{companyName},#{ordered},#{description},#{status}) ")
    public void Insert(Brand brand);

}